var constant = require('constant.js');
var {
  localTest,
  localTestApi,
  serverFormal,
  serverFormalApi,
  ossPerfix,
  ossTestPerfix
} = require('server.js');

var bizlogic = {
  // 0本地 1线上 2测试
  isLocal: constant.server_env,
  // 服务器地址z
  serverUrl: '',
  serverUrlApi: '',
  ossPerfix: ''
};
// 判断是否是本地
if (bizlogic.isLocal == 0) {
  bizlogic.serverUrl = localTest;
  bizlogic.serverUrlApi = localTestApi;
  bizlogic.ossPerfix = ossTestPerfix
} else if (bizlogic.isLocal == 1) {
  bizlogic.serverUrl = serverFormal;
  bizlogic.serverUrlApi = serverFormalApi;
  bizlogic.ossPerfix = ossPerfix
}

const loginApi = bizlogic.serverUrlApi + 'auth/b/doLogin'; // 登录
const getLoginUserApi = bizlogic.serverUrlApi + 'auth/b/getLoginUser'; // 获取用户信息
const getIndexDataApi = bizlogic.serverUrlApi + "biz/index/indexData"; // 获取首页数据
const getProblemListApi = bizlogic.serverUrlApi + "biz/expertknowledge/page"; // 获取问题列表
const getProblemDetailApi = bizlogic.serverUrlApi + "biz/expertmessage/list"; // 获取问题回复列表
const getWarnListApi = bizlogic.serverUrlApi + "biz/remindinfo/page"; // 获取预警列表
const allTaiShi = bizlogic.serverUrlApi + 'biz/index/indexData'; // 总体态势
const warnInfo = bizlogic.serverUrlApi + 'biz/remindinfo/page'; // 预警信息
const deviceInfo = bizlogic.serverUrlApi + 'biz/equipmentinfo/page'; // 设备信息
const deviceDetail = bizlogic.serverUrlApi + 'biz/equipmentinfo/detailDataPage'; // 设备详情
const getEquipmentinfoDetail = bizlogic.serverUrlApi + 'biz/equipmentinfo/getEquipmentinfoDetail'; // 设备详情
const monitorpointinfoList = bizlogic.serverUrlApi + 'biz/monitorpointinfo/list'; // 站点列表
// current=1&size=10&id=1773169836822745090&_=1718764398186
module.exports = {
  allTaiShi,
  warnInfo,
  deviceInfo,
  loginApi,
  getLoginUserApi,
  getIndexDataApi,
  getProblemListApi,
  getProblemDetailApi,
  getWarnListApi,
  allTaiShi,
  deviceDetail,
  getEquipmentinfoDetail,
  monitorpointinfoList
};